
<toaster-container></toaster-container>
<div class="row mb-2">
    <a href="javascript:;" class="text-link" [routerLink]="['../']">
        <i class="ti-arrow-left"></i> Back to Users
    </a>
</div>
<div *ngIf="user" class="row">
        This user is synchronized with CRM. Details can be edited only trough the CRM.
    <span class="col text-right">Last CRM sync: {{user.lastSyncWithCRM | date: 'dd-MM-yyy HH:mm'}}</span>
</div>
<hr>
<div class="row mt-2">
    <div *ngIf="user" class="col-md-9">
        <h3>User Information</h3>
        <dl>
            <dt>First Name</dt>
            <dd>{{user.firstName}}</dd>
            <dt *ngIf="user.middleName">Middle Name</dt>
            <dd>{{user.middleName}}</dd>
            <dt>Last Name</dt>
            <dd>{{user.lastName}}</dd>
            <dt>Account</dt>
            <dd>{{user.account}}</dd>
            <dt>Email</dt>
            <dd>{{user.email}}</dd>
        </dl>
        <h3>Additional Details</h3>
        <dl>
            <dt>Password Expiration Date</dt>
            <dd>{{user.passwordExpirationDate | date: 'dd-MM-yyy'}}</dd>            
            <dt>Status</dt>
            <dd>{{user.status}}</dd>
        </dl>
    </div> 
    <div class="col-md-3">
        <button class="btn btn-primary-dark" style="float: right" (click)="resetPass()">
            Reset Password
        </button>
    </div>
</div>